{% include 'header.twig' %}

<div class="login">
    {% if feedback %}
        <div class="alert bg-red">
            {{ feedback }}
        </div>
    {% endif %}

    {% if token_sent is defined %}
    
        If the username has an email address, you will receive a new reset code soon. Check your email.
    
    {% elseif token is defined %}
    
        <h3>Reset password</h3>
        
        <p style="margin: 1em 0 2em 0;">
            Insert your new password below. It must be at least 8 characters long.
        </p>
        
        <form action="" method="post">
            <input type="hidden" name="token" value="{{ token }}" />
            <div>
                <input type="password" name="password" class="form-control" />
            </div>
            
            <div>
                <input type="submit" name="validate" class="button button_info" value="Update new password" />
            </div>
        </form>
        
    {% else %}
    
        <h3>Reset password</h3>
        
        <p style="margin: 1em 0 2em 0;">
            Please insert your <strong>username</strong>. You will receive an email to reset your password.
        </p>
        
        <form action="" method="post">
            <div>
                <input type="text" name="username" class="form-control" />
            </div>

            <div>
                <input type="submit" name="reset" class="button button_info" value="Send reset code" />
            </div>
        </form>
        
    {% endif %}
    
</div>

{% include 'footer.twig' %}




